#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    int n;
    cin >> n;
    for(int i = 0 ; i < n ; ++i)
    {
        vector<int> edge(6);
        for(int j = 0 ; j < 6 ; ++j) cin >> edge[j];
        //选择a，b，c三条边
        bool is = false;
        for(int a = 0 ; a < 6 ; ++a)
        {
            for(int b = a+1 ; b < 6 ; ++b)
            {
                for(int c = b+1 ; c < 6 ; ++c)
                {
                    if(edge[a]+edge[b] > edge[c] && edge[a]+edge[c] > edge[b] && edge[b]+edge[c] > edge[a])
                    {
                        int temp[3];
                        int index = 0;
                        for(int k = 0 ; k < 6 ; ++k)
                        {
                            if(k != a && k != b && k != c)
                            {
                                temp[index] = edge[k];
                                ++index;
                            }
                        }
                        if(temp[0]+temp[1] > temp[2] && temp[1]+temp[2] > temp[0] && temp[0] + temp[2] > temp[1])
                        {
                            cout << "Yes" << endl;
                            is = true;
                            break;
                        }
                    }
                }
                if(is == true) break;
            }
            if(is == true) break;
        }
        if(is == false) cout << "No" << endl;
    }
    return 0;
}
// 64 位输出请用 printf("%lld")